package some.member.controller;

import javax.servlet.http.HttpSession;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import some.member.dao.MemberDao;

@Controller
public class DeleteMemberController {

	@Autowired
	private MemberDao memberDao;

	public void setMemberDao(MemberDao memberDao) {
		this.memberDao = memberDao;
	} 
	
	@RequestMapping("/deleteMember.do")
	public String submit(HttpSession session){
		
		String id = (String)session.getAttribute("id");
		
		
		memberDao.modifyGrade(id);
		session.invalidate();
		
		return "redirect:/main.do";
	}
	
}





